package com.rockcent.mall.lib.repository;

import com.rockcent.mall.lib.domain.Mall;
import com.rockcent.mall.lib.repository.MallRepositoryCustom;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by oyhk on 14-6-22.
 */
@Repository
public interface MallRepository extends MallRepositoryCustom, JpaRepository<Mall, Long>, JpaSpecificationExecutor {

    Mall findByUserInfoId(Long userInfoId);

    List<Mall> findByIdIn(List<Long> idList);

    Mall findByHostname(String hostname);

    Mall findByMobileHostName(String mobileHostName);

    Mall findBySalesCode(String salesCode);

    List<Mall> findByName(String name);

    Mall findByCustomerDomain(String customerDomain);

    Mall findByCustomerPlatformDomain(String platformDomain);

    Mall findByCustomerBusinessDomain(String businessDomain);

    List<Mall> findByCompanyName(String companyName);

    Mall findById(Long mallId);
}
